#include "type.h"

BOOL Type32_Compare(TYPE type, Type32 e1, Type32 e2)
{
	switch(type)
	{
		case TYPE_POINTER:
			return (e1._p == e2._p);
		case TYPE_ULONG :
			return 0;
		case TYPE_LONG :
			return 0;
		case TYPE_UINT :
			return (e1._uint == e2._uint);
		case TYPE_INT :
			return (e1._int == e2._int);
		case TYPE_USHORT :
			return (e1._ushort == e2._ushort);
		case TYPE_SHORT :
			return (e1._short == e2._short);
		case TYPE_UCHAR :
			return (e1._uchar == e2._uchar);
		case TYPE_CHAR :
			return (e1._char == e2._char);
		case TYPE_FLOAT :
			return (e1._float == e2._float);
		case TYPE_DOUBLE :
			return 0;
	}
	return FALSE;
}

BOOL Type64_Compare(TYPE type, Type64 e1, Type64 e2)
{
	switch(type)
	{
		case TYPE_POINTER:
			return (e1._p == e2._p);
		case TYPE_ULONG :
			return (e1._ulong == e2._ulong);
		case TYPE_LONG :
			return (e1._long == e2._long);
		case TYPE_UINT :
			return (e1._uint == e2._uint);
		case TYPE_INT :
			return (e1._int == e2._int);
		case TYPE_USHORT :
			return (e1._ushort == e2._ushort);
		case TYPE_SHORT :
			return (e1._short == e2._short);
		case TYPE_UCHAR :
			return (e1._uchar == e2._uchar);
		case TYPE_CHAR :
			return (e1._char == e2._char);
		case TYPE_FLOAT :
			return (e1._float == e2._float);
		case TYPE_DOUBLE :
			return (e1._double == e2._double);
	}
	return FALSE;
}
